const app = getApp();
const ipUrl = app.globalData.ipUrl;
const HttpUtil = require('../utils/httpUtil')
export function login(params){
  // console.log('params',params)
  // console.log('username',params.username)
  // console.log('password',params.password)
  // console.log('captchaInput',params.captchaInput)
  // console.log('captchaKey',params.captchaKey)
  return HttpUtil.request({
    data:{
      username:params.username,
      password:params.password,
      captcha_1:params.captchaInput,
      captcha_0:params.captchaKey,
    },
    url:ipUrl+'/login/',
    method:'post',
    header:{'content-type':"application/x-www-form-urlencoded"},
  })
}